package com.ruoyi.web.web.form;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/***
 * 表示验证结果
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Validation {
    private Boolean ok; // 是否通过
    private String message; // 信息

    public static Validation ok() {
        return new Validation(true, "OK");
    }

    public static Validation error(String message) {
        return new Validation(false, message);
    }
}
